;(function  ($) {
	this.loginCtrl = function  () {
		var btnLogin;
		var txtUsername;
		var txtPassword;
		
		var loadEvent = function  () {
			btnLogin.bind("click",loginHandler);
		}
		
		/**
		 * 登录并处理数据
		 */
		var loginHandler = function(){
			var ns = new NormalService();
			var user = ns.login(txtUsername.val(),txtPassword.val());
			console.log(user);
		}
		
		return {
			//事件加载,及对象搜索
			init:function(){
				btnLogin = $("#btnLogin");
				txtUsername =$("#frmLogin input[name=username]");
				txtPassword = $("#frmLogin input[name=password]");
				
				loadEvent();
			}
		}
	}();
})(jQuery)
